<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DM_SETFOCUS</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DM_SETFOCUS</h1>
<div class=navbar>
<a  href="index_dm.html">Messages</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DM_SETFOCUS</dfn> message sets the keyboard focus to the given dialog item.
</div>

<h3>Param1</h3>
<div class=descr>
The ID of the dialog item that receives the input focus.
</div>

<h3>Param2</h3>
<div class=descr>
0
</div>

<h3>Return</h3>
<div class=descr>
FALSE - the given dialog item cannot receive the keyboard focus<br>
TRUE - the focus has been set successfully.
</div>

<h3>Controls</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Control</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%">All</td>
<td class="cont" width="60%">All items that can have <a href="../keybfocus.html">keyboard input focus</a>.</td></tr>
</table>
</div>

<h3>Remarks</h3>
<div class=descr>
The <dfn>DM_SETFOCUS</dfn> spawns the following events:
<a href="dn_killfocus.html">DN_KILLFOCUS</a> for the element that loses focus and
<a href="dn_gotfocus.html">DN_GOTFOCUS</a> for the element that gets focus.
The DN_KILLFOCUS and DN_GOTFOCUS events are not generated when <var>Param1</var> 
is equal to the item currently having focus.
</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a><br>

</div>

</body>
</html>
